/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Com.view;

import Com.perpus.Pinjaman;
import Com.perpus.PinjamanTabel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTable;

/**
 *
 * @author Win-7
 */
public class PanelLihatPinjaman extends JPanel {

    private JTable tablePinjaman;
    private JLabel labelPanel;
    private ArrayList<Pinjaman> data;

    public PanelLihatPinjaman() {
    }

    public PanelLihatPinjaman(ArrayList<Pinjaman> data) {
        this.data = data;
        setLayout(new BorderLayout());

        labelPanel = new JLabel("Form Lihat Pinjaman");
        labelPanel.setHorizontalAlignment(JLabel.CENTER);
        add(labelPanel, BorderLayout.NORTH);

        tablePinjaman = new JTable();
        tablePinjaman.setModel(new PinjamanTabel(data));
        add(tablePinjaman, BorderLayout.CENTER);

    }

    public ArrayList<Pinjaman> getData() {
        return data;
    }

    public void setData(ArrayList<Pinjaman> data) {
        this.data = data;
    }
}
